<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="sf" %>

<div class="right_col" role="main">
    <div class="row">

        <div class="x_panel">
            <div class="x_title">
                <h2>
                    搜索用户
                </h2>
                <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </li>
                    <li class="dropdown"><a href="#" class="dropdown-toggle"
                                            data-toggle="dropdown" role="button" aria-expanded="false"><i
                            class="fa fa-wrench"></i></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="#">Settings 1</a></li>
                            <li><a href="#">Settings 2</a></li>
                        </ul>
                    </li>
                    <li><a class="close-link"><i class="fa fa-close"></i></a></li>
                </ul>
                <div class="clearfix"></div>
            </div>
            <div class="x_content">
                <br>
                <form class="form-horizontal form-label-left row"
                      action="${initParam.url}/admin/userlist" method="get">

                    <div class="form-group col-md-4 col-sm-4 col-xs-12">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">用户名</label>
                        <div class="col-md-9 col-sm-9 col-xs-12">
                            <input type="text" class="form-control"
                                   placeholder="Default Input" name="name">
                        </div>
                    </div>


                    <div class="form-group col-md-4 col-sm-4 col-xs-12">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">手机号</label>
                        <div class="col-md-9 col-sm-9 col-xs-12">
                            <input type="text" class="form-control"
                                   placeholder="Default Input" name="phone">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-4 col-xs-12">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12">省市</label>
                        <div class="col-md-9 col-sm-9 col-xs-12">
                            <input type="text" class="form-control"
                                   placeholder="Default Input" name="site">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-9 col-sm-9 col-xs-12 col-md-offset-1">
                            <input type="submit" class="btn btn-primary">查 找</input>

                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="x_panel">
            <div class="x_title">
                <h2>
                    用户列表
                </h2>
                <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </li>
                    <li class="dropdown"><a href="#" class="dropdown-toggle"
                                            data-toggle="dropdown" role="button" aria-expanded="false"><i
                            class="fa fa-wrench"></i></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="#">Settings 1</a></li>
                            <li><a href="#">Settings 2</a></li>
                        </ul>
                    </li>
                    <li><a class="close-link"><i class="fa fa-close"></i></a></li>
                </ul>
                <div class="clearfix"></div>
            </div>
            <div class="x_content">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="card-box table-responsive">
                            <div id="datatable-keytable_wrapper"
                                 class="dataTables_wrapper form-inline dt-bootstrap no-footer">

                                <div class="row">
                                    <div class="col-sm-12">
                                        <div
                                                style="position: absolute; height: 1px; width: 0px; overflow: hidden;">
                                            <input type="text" tabindex="0">
                                        </div>
                                        <table id="datatable-keytable"
                                               class="table table-striped table-bordered dataTable no-footer">
                                            <thead>
                                            <tr>
                                                <th>姓名</th>
                                                <th>性别</th>
                                                <th>年龄</th>
                                                <th>操作</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <c:forEach var="item" items="${userList}">
                                                <tr role="row" class="odd">
                                                    <td class="sorting_1"><a
                                                            href="userInformation?id=${item.id}">${item.name }</a></td>
                                                    <td>${item.sex}</td>
                                                    <td>${item.phone}</td>
                                                    <td><a href="addBlacklist?id=${item.id}">加入黑名单</a>|<a>删除</a></td>
                                                </tr>

                                            </c:forEach>

                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-sm-5">
                                        <div class="dataTables_info" id="datatable-keytable_info"
                                             role="status" aria-live="polite">Showing 1 to 10 of 57
                                            entries
                                        </div>
                                    </div>
                                    <div class="col-sm-7">
                                        <div class="dataTables_paginate paging_simple_numbers"
                                             id="datatable-keytable_paginate">
                                            <ul class="pagination">
                                                <li class="paginate_button previous disabled"
                                                    id="datatable-keytable_previous"><a
                                                        href="javascript:;" onclick="page(1)"
                                                        aria-controls="datatable-keytable" data-dt-idx="0"
                                                        tabindex="0">Previous</a></li>
                                                <li class="paginate_button active"><a href="#"
                                                                                      aria-controls="datatable-keytable"
                                                                                      data-dt-idx="1"
                                                                                      tabindex="0">1</a></li>
                                                <li class="paginate_button "><a href="#"
                                                                                aria-controls="datatable-keytable"
                                                                                data-dt-idx="2"
                                                                                tabindex="0">2</a></li>
                                                <li class="paginate_button "><a href="#"
                                                                                aria-controls="datatable-keytable"
                                                                                data-dt-idx="3"
                                                                                tabindex="0">3</a></li>
                                                <li class="paginate_button "><a href="#"
                                                                                aria-controls="datatable-keytable"
                                                                                data-dt-idx="4"
                                                                                tabindex="0">4</a></li>
                                                <li class="paginate_button "><a href="#"
                                                                                aria-controls="datatable-keytable"
                                                                                data-dt-idx="5"
                                                                                tabindex="0">5</a></li>
                                                <li class="paginate_button "><a href="#"
                                                                                aria-controls="datatable-keytable"
                                                                                data-dt-idx="6"
                                                                                tabindex="0">6</a></li>
                                                <li class="paginate_button next"
                                                    id="datatable-keytable_next"><a
                                                        onclick='page(${map["page"]+1})' href="javascript:;"
                                                        aria-controls="datatable-keytable" data-dt-idx="7"
                                                        tabindex="0">Next</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

</div>
